//创建自定义模板组件
Vue.component('mydiv',{
    template:`
        <div>
            <ul>
                <li v-for="u in arr" @click="f(u)">{{u}}</li>
            </ul>
        </div>
    `,
    data: function () {
        return {
            arr:["刘备","关羽","张飞"]
        }
    },
    methods:{
        f:function (u) {
            alert(u)
        }
    }
})

let v = new Vue({
    el:"mydiv",

})